% Remember to use the lgrind style

\Head{}
\File{findMultiplicities.txt}{2007}{10}{29}{12:03}{651}
\index{findMultiplicities}\Proc{findMultiplicities}\L{\LB{\K{private}_\K{static}_\V{Hashtable}\<\V{Integer},_\V{QElement}\>_\V{findMultiplicities}(\K{int}[\,]_\V{ySet},_\V{SolutionGenerator}_\V{sl})\{}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{4}{\V{Hashtable}\<\V{Integer},_\V{QElement}\>_\V{htable}_=_\K{new}_\V{Hashtable}\<\V{Integer},_\V{QElement}\>();}}
\L{\LB{}\Tab{4}{\V{QElement}_\V{value}_=_\K{null};}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\K{for}(\K{int}_\V{i}=\N{0};_\V{i}\<\V{ySet}.\V{length};_\V{i}++)\{}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\K{if}(\V{ySet}[\V{i}]_==_\N{0})_\C{}//skip_0s\CE{}}}
\L{\LB{}\Tab{12}{\K{continue};}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\K{if}(\V{htable}.\V{containsKey}(\V{ySet}[\V{i}]))}}
\L{\LB{}\Tab{12}{\V{value}_=_\V{htable}.\V{get}(\V{ySet}[\V{i}]);}}
\L{\LB{}\Tab{8}{\K{else}}}
\L{\LB{}\Tab{12}{\V{value}_=_\K{null};}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\C{}//update_multiplicity\CE{}}}
\L{\LB{}\Tab{8}{\K{if}(\V{value}==\K{null})}}
\L{\LB{}\Tab{12}{\V{value}_=_\V{sl}.\K{new}_\V{QElement}(\V{ySet}[\V{i}],\N{1},\V{i});}}
\L{\LB{}\Tab{8}{\K{else}}}
\L{\LB{}\Tab{12}{\V{value}_=_\V{sl}.\K{new}_\V{QElement}(\V{ySet}[\V{i}],\V{value}.\V{getMultiplicity}()+\N{1},\V{value}.\V{getFirstOccurence}());}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\C{}//insert_in_the_table_the_new_value\CE{}}}
\L{\LB{}\Tab{8}{\V{htable}.\V{put}(\V{ySet}[\V{i}],_\V{value});}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\K{return}_\V{htable};}}
\L{\LB{\}}}
